<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"  %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<link href="images/skin.css" rel="stylesheet" type="text/css" />
<link href="images/fox.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript" language="JavaScript">


/*$(function(){  //文档加载 
$(".tbody tr").hover( 
  function(){ 
    $(this).addClass("hover");    //鼠标经过添加hover样式 
  }, 
  function(){ 
    $(this).removeClass("hover");   //鼠标离开移除hover样式 
  } 
); 
});*/ 



</script> 
<style type="text/css"> 
.hover{background-color:#CACACA;}  /*这里是鼠标经过时的颜色*/ 
</style>
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #EEF2FB;
}
-->
</style>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="17" valign="top" background="images/mail_leftbg.gif"><img src="images/left-top-right.gif" width="17" height="29" /></td>
    <td valign="top" background="../images/content-bg.gif"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
        <td height="31"><div class="titlebt">采购管理</div></td>
      </tr>
    </table></td>
    <td width="16" valign="top" background="images/mail_rightbg.gif"><img src="images/nav-right-bg.gif" width="16" height="29" /></td>
  </tr>
  <tr>
    <td valign="middle" background="images/mail_leftbg.gif">&nbsp;</td>
    <td valign="top" bgcolor="#F7F8F9">
			<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="line_table">
		<tr>
		<td width="20">
		<img src="images/icon-login-seaver.gif" width="16" height="16" />
		</td>
		<td>
		当前位置：采购管理>>制定全年采购计划>>查看年度采购计划
		</td>

	</tr>
	</table>
	<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="line_table">
		<tr>
		
		<td width="4%"><span class="left_bt2">输入</span></td>
		<td width="10%">
		<form action="purchaseaction!queryyear.action" method="post">
		<select name="year" class="sec2" style="width:100px" onchange="document.forms[0].submit()">
	  	<option>请选择</option>
	  	<s:iterator value="qyearlist" var="years" status="st">

		<option value="<s:property value="#years"/>"><s:property value="#years"/></option>

		</s:iterator>
	  </select>
	  </form>
	  </td>
		<td width="11%"><input type="submit" class="Submit" value="查看全年计划" onclick="javascript:history.back()"/></td>
		<td width="75%"></td>
	</tr>
	</table>
	<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="line_table">
		<thead class="thead">
		<tr>
		<th height="20" >序号</th>
		<th >年份</th>
		<th >品牌</th>
		<th >车型编码</th>	
		<th >车型特征</th>	
		<th >计划数量</th>	
		<th >已采购</th>
		<th >完成情况</th>
		</tr>
		</thead>
		<tbody class="tbody">
		<s:if test="!list.isEmpty()">
		<s:iterator value="list" var="pur" status="st">
		 <tr>
		<td ><s:property value="#st.index"/></td>
		<td><s:property value="#pur.year"/></td>
		<td><s:property value="#pur.modeldictionary.brand.brandName"/></td>
		<td><s:property value="#pur.modeldictionary.modelCode"/></td>	
		<td><s:property value="#pur.modeldictionary.modelFeature"/></td>	
		<td><s:property value="#pur.planPurchaseCount"/></td>	
		<td><a style="color:#CC0000"><s:property value="#pur.purchaseCount"/></a></td>
		<td><fmt:formatNumber value="${pur.purchaseCount/pur.planPurchaseCount*100}"></fmt:formatNumber>  </td>
		
		</tr>
		</s:iterator>
		</s:if>
		<s:else>
			对不起没有您需要的信息.
		</s:else>
		</tbody>	
    </table>
		<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="line_table">
		<tr>
		
		<td width="89%">&nbsp;</td>
		<td width="11%" align="center">
			<a href="javascript:history.back()" class="red">
		  <input type="submit" class="Submit" value="返  回" onclick="javascript:history.back()"/></a>		</td>
	</tr>
	</table>
	</td>
    <td background="images/mail_rightbg.gif">&nbsp;</td>
  </tr>
  <tr>
    <td valign="bottom" background="images/mail_leftbg.gif"><img src="images/buttom_left2.gif" width="17" height="17" /></td>
    <td background="images/buttom_bgs.gif"><img src="images/buttom_bgs.gif" width="17" height="17"></td>
    <td valign="bottom" background="images/mail_rightbg.gif"><img src="images/buttom_right2.gif" width="16" height="17" /></td>
  </tr>
</table>
页面要求：<br />
1.默认显示今年的采购计划<br />
2.能够根据指定年份，查看其全年计划。<br />
</body>
</html>